package top.sxlai.controller;

import top.sxlai.entity.DTO.OpUserInfoDto;
import top.sxlai.service.OpUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @author : sxl
 * @date : 2024/4/7 18:02
 * @Version: 1.0
 */

@RestController
public class ChangeUserInfoController {

    @Autowired
    private OpUserService opUserService;

    @PostMapping("/changeUserInfo")
    public ResponseEntity<Map<String, String>> changeUserInfo(@RequestBody OpUserInfoDto opUserInfoDto) {

        return opUserService.changeUserInfo(opUserInfoDto);
    }

    @PostMapping("/changePassword")
    public ResponseEntity<Map<String, String>> changePassword(@RequestBody OpUserInfoDto opUserInfoDto) {
        return opUserService.changePassword(opUserInfoDto);
    }

}
